<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*, javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="org.apache.commons.io.output.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<% 
	String img1 = (String)request.getAttribute("img1");
	String img2 = (String)request.getAttribute("img2");
	
	//out.println(arg +"   "+imgpath);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<meta charset="utf-8"/>
	<link href="css/bootstrap.css" rel="stylesheet">
	<link rel="stylesheet" href="css/main.css">
	<link rel="stylesheet" href="css/datepicker.css">

	<script src="js/jquery.js"></script>
	<script src="js/bootstrap.js"></script>
	<script src="js/bootstrap-datepicker.js"></script>
	<title>名片管理系统</title>
	</head>
<script language="javascript">
$(function(){
	$("#optionsRadios1").click(function(){
		$("#optionsRadios2").attr("checked",false);
		$("#upload").attr("action","fileUpload?arg=1&img2="+$("#img2").val());
	});
	
	$("#optionsRadios2").click(function(){
		$("#optionsRadios1").attr("checked",false);
		$("#upload").attr("action","fileUpload?arg=2&img1="+$("#img1").val());
	});
	
	$("#birthday").click(function()
	{
		$('#birthday').datepicker({
			format: 'yyyy-mm-dd'
		});
		
	});
});

</script>
<body>
	<br>
	
	<div id="searchdiv" style="background-color:#efefef;height:600px">
		<div style="width:400px;float:left">
			<p><strong>名片正面</strong>&nbsp;<input checked="checked" type="radio"name="optionsRadios1" id="optionsRadios1" /></p>
			<img
			 class="img-rounded" style="margin-left:30px;" alt="正面" 
			 src="upload/<%=img1 %>" width="350px" height="250px">
			 <input id="img1" type="hidden" value="<%=img1 %>" />		 
			<p><strong>名片反面</strong>&nbsp;<input type="radio"name="optionsRadios2" id="optionsRadios2" /></p>
			<img
			class="img-rounded" style="margin-left:30px;" alt="反面"
			 src="upload/<%=img2 %>" width="350px" height="250px">
			 <input id="img2" type="hidden" value="<%=img2 %>" />
		</div>
		<div style="width:480px;float:left">
<ul class="nav nav-tabs">
  <li class="active"><a href="#basic" data-toggle="tab">基本信息</a></li>
  <li><a href="#addr1" data-toggle="tab">住址1</a></li>
  <li><a href="#addr2" data-toggle="tab">住址2</a></li>
  <li><a href="#else" data-toggle="tab">其他</a></li>
  <li><a href="#pinfo" data-toggle="tab">个人信息</a></li>
  <li><a href="#cmpinfo" data-toggle="tab">公司信息</a></li>
</ul>
<div class="tab-content">
	<div class="tab-pane active" id="basic">
	<form id="upload" action="fileUpload?arg=1&img2=<%=img2 %>" method="post" enctype="multipart/form-data" >
        <table>
				<tr>
					<td><strong>名片图片上传</strong></td>
					<td></td>
				</tr>
				<tr>
					<td><input type="file" id="upfile" name="file" value="选择文件" /></td>
					<td><input class="btn btn-primary btn-xs" type="submit" id="upfile" value="上传" /></td>
				</tr>
		</table>
	</form>
	<form action="" method="post" >
	<table class="table table-condensed table-bordered">
				<tr>
					<td><strong>名片信息</strong></td>
					<td>&nbsp;</td>
				</tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;公司名:</span><br></td><td> <%=request.getAttribute("txtComJNam") %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;公司名(拼音):</span>
			<br></td><td><%=request.getAttribute("txtComJNampy") %><br></td>
	</tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;公司名(英文):</span><br></td><td><%=request.getAttribute("txtComJNameng") %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;部门名:</span><br></td><td><%=request.getAttribute("txtComunit") %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;职务:</span><br></td><td><%=request.getAttribute("txtComcaree") %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;姓名:</span><br></td><td><%=request.getAttribute("txtComname") %></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;姓名(拼音):</span><br></td><td><%=request.getAttribute("txtComnamepy") %></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;设为我的名片:</span><br></td><td><%=request.getAttribute("txtCommycard") %></td></tr>
				
			</table>
				</form>
	</div>
	<div class="tab-pane" id="addr1">
	<table class="table table-bordered">
		<tbody>
			<tr>
				<td width="40%">&nbsp;&nbsp;&nbsp;<span>邮政编号:</span></td>
				<td><%=request.getAttribute("txtComnamepy") %><input type="button" class="btn btn-primary btn-xs" value="地址转换"></td>
			</tr>
			<tr>
				<td><span>&nbsp;&nbsp;&nbsp;住址 省:</span></td><td><%=request.getAttribute("zipprovince1") %></td>
			</tr>
			<tr>
				<td><span>&nbsp;&nbsp;&nbsp;市:</span></td><td><%=request.getAttribute("zipcity1") %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>区:</span></td><td><%=request.getAttribute("zipzone1") %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>地址:</span></td><td><%=request.getAttribute("zipaddress1") %></td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话1:</span></td><td><%=request.getAttribute("zipphone1") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话2:</span></td><td><%=request.getAttribute("zipphone2") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>手机:</span></td><td><%=request.getAttribute("zipmobile1") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>传真:</span></td><td><%=request.getAttribute("zipfax1") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电子邮件:</span></td><td><%=request.getAttribute("zipemail1") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>URL:</span></td><td><%=request.getAttribute("zipurl1") %></td></tr>
		</tbody>
	</table>
	</div>
	<div class="tab-pane" id="addr2">
		<table class="table table-bordered">
			<tbody>
				<tr>
					<td width="40%">&nbsp;&nbsp;&nbsp;<span>邮政编号:</span></td>
					<td><%=request.getAttribute("zip2") %>&nbsp;<input type="button" class="btn btn-primary btn-xs" value="地址转换"></td>
				</tr>
				<tr>
				<td><span>&nbsp;&nbsp;&nbsp;住址 省:</span></td><td><%=request.getAttribute("zipprovince2") %></td>
			</tr>
			<tr>
				<td><span>&nbsp;&nbsp;&nbsp;市:</span></td><td><%=request.getAttribute("zipcity2") %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>区:</span></td><td><%=request.getAttribute("zipzone2") %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>地址:</span></td><td><%=request.getAttribute("zipaddress2") %></td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话1:</span></td><td><%=request.getAttribute("ziptelphone1") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话2:</span></td><td><%=request.getAttribute("ziptelphone2") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>手机:</span></td><td><%=request.getAttribute("zipmobile2") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>传真:</span></td><td><%=request.getAttribute("zipfax2") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电子邮件:</span></td><td><%=request.getAttribute("zipemail2") %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>URL:</span></td><td><%=request.getAttribute("zipurl2") %></td></tr>
			</tbody>
		</table>	
	</div>
	<div class="tab-pane" id="else">
		<table class="table table-bordered">
			<tr><td>&nbsp;&nbsp;&nbsp;<span>公开:</span></td>
				<td>
					<%=request.getAttribute("ddlstPublic") %>
						
				</td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>重要度:</span></td>
				<td>
					<%=request.getAttribute("ddlstImptantKub") %>
					
				</td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>关系:</span></td>
				<td>
					<%=request.getAttribute("ddlstRelationKub") %>
						
			</td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>职业:</span></td>
				<td>
					<%=request.getAttribute("ddlstJobKub") %>
						
			</td></tr>
		</table>

	</div>
	<div class="tab-pane" id="pinfo">
		<table class="table table-bordered">
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>性别:</span><br></td>
				<td>
					<%=request.getAttribute("ddlstSexKub") %>
						
			</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>血型:</span></td>
				<td>
					<%=request.getAttribute("ddlstBlodKub") %>
						
			</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>生日:</span></td>
				<td>
					<%=request.getAttribute("birthday") %>
				</td>
			</tr>
			<tr><td align="left" width="100" rowspan="6" valign="top">&nbsp;&nbsp;&nbsp;<span>备忘录:</span></td>
				<td rowspan="6">
					<%=request.getAttribute("txtMemo") %>
			</td></tr>
		</table>

		
	</div>
	<div class="tab-pane" id="cmpinfo">
		<table class="table table-bordered">
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>行业:</span><br></td><td><%=request.getAttribute("industry") %></td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>成立年月:</span></td><td><%=request.getAttribute("establish") %></td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>资金(百万):</span></td><td><%=request.getAttribute("funding") %></td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>员工数:</span></td><td><%=request.getAttribute("staff") %></td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>证券代码:</span></td><td> <%=request.getAttribute("security") %></td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>法人代表:</span></td><td><%=request.getAttribute("corporate") %></td></tr>
		</table>
			
	</div>
</div>
		
		</div>
		
	</div>
	

</body>
</html>